import Vue from 'vue'
Vue.use(Router)
import Router from 'vue-router'
//import login from '@/components/admin/login/login'
//import home from '@/components/admin/home/home'
//import main from '@/components/admin/main/main'
//import system from '@/components/admin/system/system' //系统管理
//import banner from '@/components/admin/system/banner' //系统管理
//import provider from '@/components/admin/basic/provider' //商家管理
//import customer from '@/components/admin/basic/customer' //客户管理
//import pop from '@/components/admin/basic/pop' //推广渠道
//import demand from '@/components/admin/business/demand' //客户需求
//import provi from '@/components/admin/business/provider' //商家需求
//import allot from '@/components/admin/business/allot' //业务分配
//import creditInfo from '@/components/admin/business/creditInfo'
//import proAllotq from '@/components/admin/query/proAllotq' //商家分配查询
//import popquery from '@/components/admin/query/popquery' //推广总汇查询
//import popdetail from '@/components/admin/query/popdetail' //推广详情查询
//import manquery from '@/components/admin/query/manquery'//需求查询

//import entry from '@/components/seller/login'//商家登录
//import homepage from '@/components/seller/home/home' //商家首页
//import index from '@/components/seller/main/main' //商家首页
//import demans from '@/components/seller/release/demands' //发布需求
//import deNeeds from '@/components/seller/needs/deNeeds' //还款管理
//import rehear from '@/components/seller/needs/rehear' //还款管理
//import examine from '@/components/seller/examine/examine' //审批查询
//import credit from '@/components/seller/credit/credit' //放款管理
//import repayment from '@/components/seller/repayment/repayment' //还款管理
//import sys from '@/components/seller/sys/sys' //还款管理
//import creditInfos from '@/components/seller/examine/creditInfos'
export default new Router({
  routes: [
    {
      path: '/admin',
      name: 'login',
      component:resolve => void(require(['@/components/admin/login/login'], resolve))
    },
    {
      path: '/home',
      name: 'home',
      component: resolve => void(require(['@/components/admin/home/home'], resolve)),
      children:[
      	{
		      path: '/main',
		      name: 'index',
		      component: resolve => void(require(['@/components/admin/main/main'], resolve)),
		    },
	      {
		      path: '/system',
		      name: 'system',
		      component: resolve => void(require(['@/components/admin/system/system'], resolve)),
		    },
		    {
		      path: '/banner',
		      name: 'banner',
		      component: resolve => void(require(['@/components/admin/system/banner'], resolve)),
		    },
		    {
		      path: '/provider',
		      name: 'provider',
		      component: resolve => void(require(['@/components/admin/basic/provider'], resolve)),
		    },
		    {
		      path: '/customer',
		      name: 'customer',
		      component: resolve => void(require(['@/components/admin/basic/customer'], resolve)),
		    },
		    {
		      path: '/pop',
		      name: 'pop',
		      component: resolve => void(require(['@/components/admin/basic/pop'], resolve)),
		    },
		    {
		      path: '/demand',
		      name: 'demand',
		      component: resolve => void(require(['@/components/admin/business/demand'], resolve)),
		    },
		    {
		      path: '/provi',
		      name: 'provi',
		      component: resolve => void(require(['@/components/admin/business/provider'], resolve)),
		    },
		    {
		      path: '/allot',
		      name: 'allot',
		      component: resolve => void(require(['@/components/admin/business/allot'], resolve)),
		    },
		    {
		    	path: '/creditInfo/:id',
		      name: 'creditInfo',
		      component: resolve => void(require(['@/components/admin/business/creditInfo'], resolve)),
		    },
		    {
		      path: '/proAllotq',
		      name: 'proAllotq',
		      component: resolve => void(require(['@/components/admin/query/proAllotq'], resolve)),
		    },
		    {
		      path: '/popquery',
		      name: 'popquery',
		      component: resolve => void(require(['@/components/admin/query/popquery'], resolve)),
		    },
		    {
		      path: '/popdetail',
		      name: 'popdetail',
		      component: resolve => void(require(['@/components/admin/query/popdetail'], resolve)),
		    },
		    {
		      path: '/manquery',
		      name: 'manquery',
		      component: resolve => void(require(['@/components/admin/query/manquery'], resolve)),
		    },
      ]
    },
    {
      path: '/',
      name: 'entry',
      component: resolve => void(require(['@/components/seller/login'], resolve)),
    },
    {
      path: '/homepage',
      name: 'homepage',
      component: resolve => void(require(['@/components/seller/home/home'], resolve)),
      children:[
	      {
		      path: '/index',
		      name: 'mains',
		      component: resolve => void(require(['@/components/seller/main/main'], resolve)),
	      },
	      {
		      path: '/demans',
		      name: 'demans',
		      component: resolve => void(require(['@/components/seller/release/demands'], resolve)),
	      },
	      {
		      path: '/examine',
		      name: 'examine',
		      component: resolve => void(require(['@/components/seller/examine/examine'], resolve)),
	      },
	      {
		    	path: '/creditInfos/:id',
		      name: 'creditInfos',
		      component: resolve => void(require(['@/components/seller/examine/creditInfos'], resolve)),
		    },
	      {
		      path: '/credit',
		      name: 'credit',
		      component: resolve => void(require(['@/components/seller/credit/credit'], resolve)),
	      },
	      {
		      path: '/repayment',
		      name: 'repayment',
		      component: resolve => void(require(['@/components/seller/repayment/repayment'], resolve)),
	      },
	      {
		      path: '/deneeds',
		      name: 'deNeeds',
		      component: resolve => void(require(['@/components/seller/needs/deNeeds'], resolve)),
	      },
	      {
		      path: '/rehear/:id',
		      name: 'rehear',
		      component: resolve => void(require(['@/components/seller/needs/rehear'], resolve)),
	      },
	      {
		      path: '/sys',
		      name: 'sys',
		      component: resolve => void(require(['@/components/seller/sys/sys'], resolve)),
	      }
      ]
    },
  ]
})